//package com.LachesismStorm.lachesism.member.mini.controller;
//
//import com.LachesismStorm.lachesism.core.common.response.ResponseResult;
//import com.LachesismStorm.lachesism.member.mini.service.MiniService;
//import com.LachesismStorm.lachesism.member.mini.vo.MiniMenu;
//import com.LachesismStorm.lachesism.member.mini.vo.MiniOrder;
//import com.LachesismStorm.lachesism.member.mini.vo.MiniOrderItem;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.web.bind.annotation.*;
//import org.springframework.web.multipart.MultipartFile;
//
//import javax.annotation.Resource;
//import java.awt.*;
//import java.util.List;
//
///**
// * @Author lachesism
// * @Date 2024-12-20 13:31
// **/
//@RestController
//@Api(tags = "小程序接口")
//@RequestMapping("/mini")
//public class MiniController {
//
//    @Resource
//    private MiniService miniService;
//
//    /**
//     * 上传菜图
//     */
//    @ApiOperation(value = "上传菜图")
//    @PostMapping("/uploadImg")
//    public ResponseResult uploadImg(@RequestParam("file") MultipartFile file) {
//        String path = miniService.uploadImg(file);
//        return ResponseResult.success(path);
//    }
//
//    /**
//     * 加菜品
//     */
//
//    @ApiOperation(value = "添加菜品")
//    @PostMapping("/addMenu")
//    public ResponseResult addMenu(@RequestBody MiniMenu miniMenu) {
//        miniService.addMenu(miniMenu);
//        return ResponseResult.success(null, "添加成功");
//    }
//
//    /**
//     * 修改菜信息
//     */
//    @ApiOperation(value = "修改菜信息")
//    @PostMapping("/updateMenu")
//    public ResponseResult updateMenu(@RequestBody MiniMenu miniMenu) {
//        miniService.updateMenu(miniMenu);
//        return ResponseResult.success(null, "修改成功");
//    }
//
//    /**
//     * 提交订单
//     */
//    @ApiOperation(value = "提交订单")
//    @PostMapping("/createOrder")
//    public ResponseResult createOrder(@RequestBody List<MiniOrderItem> miniMenuList) {
//        miniService.createOrder(miniMenuList);
//        return ResponseResult.success(null, "提交订单");
//    }
//
//    /**
//     * 查询订单列表
//     */
//    /**
//     * 提交订单
//     */
//    @ApiOperation(value = "查询订单列表")
//    @PostMapping("/getOrderList")
//    public ResponseResult getOrderList() {
//       List<MiniOrder> orderList =  miniService.getOrderList();
//        return ResponseResult.success(orderList, "查询成功");
//    }
//
//    /**
//     * 查询订单信息
//     */
//
//    @ApiOperation(value = "查询订单列表")
//    @PostMapping("/getOrderInfo")
//    public ResponseResult getOrderInfo(@RequestParam Integer orderId) {
//        List<Menu> menuList =  miniService.getOrderInfo(orderId);
//        return ResponseResult.success(menuList, "查询成功");
//    }
//}
